GtkWindow: Make set_focus work before show
authorMatthias Clasen <mclasen@redhat.com>
Sat, 2 Aug 2014 09:28:03 +0000 (11:28 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 2 Aug 2014 09:38:23 +0000 (11:38 +0200)
commitf15ebc2dd21aba1c8b0ac9526258c556c0052a71
tree015daae0051b77d5a9702548c5dbec3072985bcd
parente934ddd4988e093cb2485b2dbfa2c22551639b0c
GtkWindow: Make set_focus work before show

So far, gtk_window_set_focus just did not work when called on
a hidden window. Change it to record the desired focus widget
for hidden windows, and apply it when the window gets shown.

This is similar to how we tread other window properties that
can't be set before the window is realized, like maximized
or fullscreen.

This is related to
https://bugzilla.gnome.org/show_bug.cgi?id=734033
gtk/gtkwindow.c